﻿using System;

namespace MessagePack.Decoders
{
	// Token: 0x020000ED RID: 237
	internal class ReadNextMap : IReadNextDecoder
	{
		// Token: 0x06000366 RID: 870 RVA: 0x0000C6F7 File Offset: 0x0000AAF7
		private ReadNextMap()
		{
		}

		// Token: 0x06000367 RID: 871 RVA: 0x0000C700 File Offset: 0x0000AB00
		public int Read(byte[] bytes, int offset)
		{
			int num = offset;
			int num3;
			int num2 = MessagePackBinary.ReadMapHeader(bytes, offset, out num3);
			offset += num3;
			for (int i = 0; i < num2; i++)
			{
				offset += MessagePackBinary.ReadNext(bytes, offset);
				offset += MessagePackBinary.ReadNext(bytes, offset);
			}
			return offset - num;
		}

		// Token: 0x04000106 RID: 262
		internal static readonly IReadNextDecoder Instance = new ReadNextMap();
	}
}
